/**
 * Created by Administrator on 2015/12/29.
 */
angular.module('gywm.service',[])
  .service('gywmService',['appItfAopService',function(appItfAopService) {

    //客户校验
    // var params={
    // "_GRANT_TICKET":"111111",
    // "sysCode":"CBS", //系统编码 CBS 、BSS 、ESS ，必填
    //  "psptType": "1", // 证件类型，必选
    //  "brandCode":"4G00",  // 产品品牌，必选
    //  "productTypeCode" : "4G000001", // 产品类型编码，必选
    //  "psptId":"370402198707172514",  // 证件号码，必选
    //  "netTypeCode": "50", // 产品网别，必选
    //  "productId": "99999823", // 产品编码，必选
    //};

    //号码查询
    //var params={
    //  "_GRANT_TICKET":"",
    //  "_LOGIN_PARAM":"",
    //  "sysCode":"CBS",//系统编码 CBS 、BSS 、ESS ，必填
    //  "netTypeCode":"50", // 业务类型，必选
    //  "serialNumber":"",// 号码，可选
    //  "hwxh":"",// 是否号尾选号，可选
    //  "lhType":"", // 靓号类型，可选
    //  "snPrefix":"",// 号码前缀，可选
    //  "snPostfix":"",// 号码后缀，可选
    //  "minDeposit":"",// 最小预存，必选
    //  "maxDeposit":"",// 最大预存，必选
    //  "currPage": 1
    //}
    //号码校验
    //var params={
    //  "_GRANT_TICKET":"",
    //  "sysCode" :"CBS",//系统编码 CBS 、BSS 、ESS ，必填
    //  "netTypeCode":"50", // 网别，必选
    //  "serialNumber":"18627844325" // 号码，必选
    //}

    //发展人查询
    //var params={
    //  "_GRANT_TICKET":"",
    //  "sysCode":"CBS",//系统编码 CBS 、BSS 、ESS ，必填
    //  "provinceId": 71, // 省份代码，必选
    //  //"eparchyCode": 0851, // 总部地市编码，必选，
    //  //"cucDepartCode":"85a0100",// 总部部门编码，必选
    //  "channelCode":"",  // 渠道编码，可选
    //  "channelName":"",  // 渠道名称，可选
    //  "developName":"",  // 发展人名称，可选
    //  "developSerialNumber":"",  // 发展人手机号码，可选
    //  "developCode":"",  // 发展人编码，可选
    //  "RowCount":20, // 每页条数，必选,
    //  "Page":1// 第几页，必选
    //}

    //套餐校验
    //var params={
    //  "_GRANT_TICKET":"",
    //  "sysCode":"CBS",//系统编码 CBS 、BSS 、ESS ，必填
    //  "netTypeCode":"50", // 网别，必选
    //  "serialNumber":"18627844325", // 号码，必选
    //  "productId":"99999829",//套餐ID，必选
    //  "productName":"4G全国套餐-106元套餐",  //套餐名称，必选。必须与cBSS套餐名称一致
    //  "lowCost":"50" //最低消费，必选。从号码校验接口获取
    //}
    //根据产品类型查询产品列表
    //var params={
    //  "_GRANT_TICKET":"",
    //  "sysCode":"CBS",//系统编码 CBS 、BSS 、ESS ，必填
    //  "root":"SALE",//根类型，必选，查询营销活动时填SALE
    //  "productTypeCode":"99999829", // 产品类型编码，必选，查询活动时填写活动类型
    //  "productId":"99999829", // 基本产品ID，可选，查询活动时必填
    //  "assureType":"4",// 担保类型，可选，查询活动时必填，传固定值4即可
    //  "deviceType":"",  // 设备类型，可选，终端的合约必填
    //  "deviceBrand":"",  // 设备品牌，可选，终端的合约必填
    //  "deviceNumber":"",  // 机型编码，可选，终端的合约必填
    //  "serialNumber":"",  // 手机号码，可选，终端的合约必填
    //}
    //根据产品获取包接口
    //var params={
    //  "_GRANT_TICKET":"",
    //  "sysCode":"CBS",//系统编码 CBS 、BSS 、ESS ，必填
    //  "productId":"99999829", // 基本产品ID，必选
    //  "modifyTag":0// 整合标记，必选，传0即可
    //}

    //根据包获取元素接口
    //var params={
    //  "_GRANT_TICKET":"",
    //  "sysCode":"CBS",//系统编码 CBS 、BSS 、ESS ，必填
    //  "productId":"99999829", // 产品ID，必选
    //  "packageId":"59999787",//包Id ，必选
    //  "prodModifyTag":"0"// 传固定值0，必选
    //}
    //串口校验
    //var params={
    //  "_GRANT_TICKET":"",
    //  "sysCode":"CBS",//系统编码 CBS 、BSS 、ESS ，必填
    //  "imei":"11111111110", // 串号，必选
    //  "terminalType":"1", // 终端类型，非必选
    //  "dPackageType":"", // 套餐包，非必选
    //  "selectTypeStr":""  // 查询类型，非必选
    //}
    //订单列表查询接口
    /*    var params={
     "_GRANT_TICKET":"",
     "orderId":"",//订单编码，可选
     "orderType":"01",//订单类型，固定传值01：开户，必选
     "orderSource":"01",//订单来源，01：沃易登；02：移动助销；，必选
     "orderStatus":"",//订单状态，可选
     "custName":"",//开户客户姓名，可选
     "serialNumber":"",//开户号码，可选
     "createBeginTime":"",//订单创建开始时间
     "createEndTime":"",//订单创建结束时间
     "departTag":"on",//是否查部门下多有订单标记，可选
     "rows":20,//每页返回行数
     "page":1//第几页
     }*/
    //查询产品
    //var params={}

    //查询订单类型
    //var params={
    //  "typeId":"ORDER_ORDER_TYPE"
    //}
    //查询订单状态
    //var params={
    //  "typeId":"ORDER_ORDER_STATUS"
    //}
    //2，3，4G缴费查询 ok
    //var params={
    //  "serialNumber":"18551855717",
    //  "netTypeCode":"50",
    //  "sysCode":"CBS",
    //  "isAgent":"0"
    //  }

    //返档
    //var params = {
    //  //"sysCode": "CBS",
    //  "mobilePhone": "13296600248"
    //}
    //4G客户校验接口 （是否是黑名单）
    //var params = {
    //  //"sysCode": "CBS",
    //  "psptId": "370402198707172514"
    //}
    //缴费
    //var params={
    //  "serialNumber":"13147100954",
    //  "tradeFee":50
    //  }

    //SIM卡号和手机号互查
    //var params={
    //  "QryType":"1",  //查询类别，1- 根据SIM查号码，2 - 根据号码查SIM，必填
    //  "QryCode":"8986011527710131346", //查询类别为SIM时，该参数为号码，查询类别为号码时，该参数为SIM，必填
    //  "IsPre":"0", //是否为预配号码。0已开卡（返档使用）；1预配卡（开卡使用），必填
    //  }

    //部门子账户余额查询
    //var params={
    //
    //}

    //4G返档需要的接口，在确认返档之前
    //var params={
    //  "Name": "夏利辉",
    //  "Sex": "1",
    //  "Nation": "汉",
    //  "CheckType": "1",
    //  "folkCode": "01",
    //  "Born": "1988-09-17",
    //  "Address": "安徽省合肥市蜀山区莲花路１６８８号合肥师范学院１０级计算机系    ",
    //  "CardNo": "341224198809170256",
    //  "Police": "合肥市公安局蜀山分局    ",
    //  "ActivityLFrom": "20120111",
    //  "ActivityLTo": "20220111",
    //  "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1uoDY7GrvkgnNZMUzKw5zWjHO22smdCfQmMdQyqORTzKxNUbq4dCcUIpkU8YIIqjsCGpjcPIeTV620sTBZJJCQwyBVRjdmE58urK0CeeRGASCOeK3UuXsMeS7Kw4AFILaO3ixGMYqoczXGSSCOMiuyELLU8+rV5nodNY+IG8oC8TLY6xj+lFc7IXibb5hNFXYy5mf/9k="
    //}

    //2G获取白卡信息
    var params={
      "PREPAY_TAG": "01",//非必填，默认
      "CUST_NAME": "郭雷",//客户姓名
      "BUSI_TYPE": "22",//业务类型
      "PRODUCT_ID": "53354873",//套餐编号
      "SERIAL_NUMBER": "15527355454",//手机号码
      "TRADE_ID":"2716012315880855",//预提交返回的省份订单编号
      "SIM_CARD" :"8986011587103672888",//sim卡号
      "sysCode": "BSS",//系统编码
      "PSPT_ID": "420323198810083131"//身份证编号
    }

    var resp={};
    return {
      getParams:function()
      {
        return params;
      },
      getResp:function()
      {
        return resp;
      },
      doLogout:function()
      {
        return appItfAopService.do_Logout_req();
      },

      doClick:function()
      {
        //客户校验
        //return appItfService.do_validCust_req(params);

        //号码查询
        //return appItfService.do_querySerialNumberList_req(params);

        //号码校验
        //return appItfService.do_validSerialNumber_req(params);

        //发展人查询
        //return appItfService.do_queryDevelopList_req(params);

        //套餐校验接口
        //return appItfService.do_validProduct_req(params);

        //根据产品类型查询产品列表
        //return appItfService.do_productInfoByType_req(params);

        //根据产品获取包接口
        //return appItfService.do_packageByPId_req(params);

        //根据包获取元素接口
        //return appItfService.do_elementByPkgId_req(params);

        //串口校验
        //return appItfService.do_validImei_req(params);

        //订单列表查询
        //return appItfService.do_queryOrderList_req(params);

        //查询产品
        //return appItfService.do_queryProductList_req(params);
        //return appItfService.do_queryStaticList_req(params);

        //缴费查询
        //return appItfService.do_queryFeeInfo_req(params);
        //返档校验
        //return appItfService.do_searchUserInfoByPhone_req(params);

        //缴费
        //return appItfService.do_chargeFeeNormal_req(params);

        //SIM和手机号互查
        //return appItfService.do_queryUserBySim_req(params);

        //查询部门子账户
        //return appItfService.do_qtySysAcct_rep(params);


        //4G客户校验接口 （是否是黑名单）
        //return appItfService.do_authenticate_req(params);

        //4G返档需要的接口，在确认返档之前
        //return appItfService.do_insertPsptInfo_req(params);

        //2G获取白卡信息
        return appItfAopService.do_SimcardInfo2G_req(params);
      },
      do_Logout:function(param){
        return appItfAopService.do_Logout_req(param);
      },
      //插入日志
      insertLog:function(param)
      {
        return appItfAopService.do_insertLog_req(param);
      }

    };
  }]);
